package thread;

import com.heima.model.admin.pojos.AdUser;
import com.heima.model.wemedia.pojos.WmUser;

public class AdThreadLocalUtil {

    private static final ThreadLocal<AdUser> WM_USER_THREAD_LOCAL = new ThreadLocal<>();


    //存入数据
    public static void setUser(AdUser adUser){
        WM_USER_THREAD_LOCAL.set(adUser);
    }


    //获取数据
    public static AdUser getUser(){
        return WM_USER_THREAD_LOCAL.get();
    }


    //清理数据
    public static void clear(){
        WM_USER_THREAD_LOCAL.remove();
    }
}
